package com.ruoyi.system.service.impl;
/**
 * ClassName: ClientServiceImpl <br/>
 * Description: <br/>
 * date: 2020/3/26 9:36<br/>
 *
 * @author Hesion<br />
 * @version
 * @since JDK 1.8
 */

import com.ruoyi.system.domain.SysClient;
import com.ruoyi.system.mapper.ClientMapper;
import com.ruoyi.system.service.IClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @program: ruoyi
 * @description:
 * @author: hesion
 * @create: 2020-03-26 09:36
 **/
@Service
public class ClientServiceImpl implements IClientService {

    @Autowired
    ClientMapper clientMapper;
    @Override
    public List<SysClient> selectClientByPage(SysClient sysClient) {
        return clientMapper.selectClientByPage(sysClient);
    }

    @Override
    public SysClient selectClientById(String id) {
        return clientMapper.selectClientById(id);
    }

    @Override
    public Integer edit(SysClient sysClient) {
      sysClient.setUpdateTime(new Date());
        return clientMapper.edit(sysClient);
    }

    @Override
    public Integer add(SysClient sysClient) {
        sysClient.setCreateTime(new Date());
        sysClient.setDel_flag("0");
        return clientMapper.add(sysClient);
    }

    @Override
    public Integer remove(String id) {
        return  clientMapper.remove(id);
    }
}
